package common;

import android.support.annotation.StringDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;


public class Constant {


    public final static String URL_EXTRANET="ws://47.96.27.231:8080/xan/websocket"; // war包部署到tomcat路径会有变化
    public final static String URL_INTRANET="ws://10.0.2.2:8080/websocket";


    /**
     * main ui update id
     */
    public static final int UI_UPDATE_WEBSOCKET_OPEN    = 1;
    public static final int UI_UPDATE_REGISTER          = 2;
    public static final int UI_UPDATE_REQUESTFRIENDS    = 3;
    public static final int UI_UPDATE_CHAT_SEND         = 4;
    public static final int UI_UPDATE_CHAT_RECV         = 5;

    public static final int UI_PlayerLogon          = 0;
    public static final int UI_PlayerLogoff         = 1;
    public static final int UI_RequestFriends       = 2;
    public static final int UI_Chat                 = 3;
    public static final int UI_PlayerOnline         = 4;
    public static final int UI_PlayerOffline        = 5;
    public static final int UI_CreateGroup          = 6;


    public static final String UI_UPDATE_REGISTER_RET_CODE      = "ret_code";
    public static final String UI_UPDATE_REQUESTFRIENDS_KEY     = "request_friends";


    @StringDef({
            Gender.MALE,
            Gender.FEMALE
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface Gender {
        String MALE = "male";

        String FEMALE = "female";
    }
}
